<%@ page language="java" contentType="text/html; charset=UTF-8"%>

<!DOCTYPE html>
<html>
	<head>
		<title>商城后台_分类管理</title>
		<%@include file="../header.jsp" %>
		
		<style>
		
			body{padding-top: 70px;}
			._container {width: 802px;border: 1px solid gray;margin:0 auto;margin-top: 10px;background-color: white;margin-bottom: 10px;min-height: 400px;border-radius: 5px;overflow: hidden;}
			._title{width: 800px;margin: 0 auto;}
			._table{width: 800px;margin: 0 auto;height: auto;}
			._table h4{margin-left: 20px;}
			._returnbtn{border: none;border-radius: 3px;margin-right: 10px;}
			._sendbtn{border: none;border-radius: 3px;margin-right: 10px;background-color: orangered;color: white;}
			
		</style>
	</head>
	<body>
		<%@include file="top.jsp" %>
		
		<div class="_container">
			<div class="_title">
				<s:hidden id="orderId" name="order.id"/>
				订单号：<span style="color:#FF4400;"><s:property value="order.id"/> (<s:property value="order.status"/>)</span> <br />
				下单时间：<span style="color:#FF4400;"><s:date name="order.time" format="yyyy-MM-dd hh:mm"/></span><br />
				收件人:<span style="color:#FF4400;"><s:property value="order.consignee"/></span> <br />
				收件地址:<span style="color:#FF4400;"><s:property value="order.address"/></span>
			</div>
			<div class="_table">
				<hr />
				<h4>商品清单 </h4>	
				<div class="_table_main">
					<table class="table table-condensed">
						<tr style="background-color: #EFEAE5;">
							<th>商品名称</th>
							<th>商品图片</th>
							<th>单价</th>	
							<th>数量</th>
							<th>小计</th>
						</tr>
						<s:iterator value="order.orderItems" status="st">
							<tr>
								<td style="vertical-align: middle;width: 300px;"><s:property value="good.name"/></td>
								<td ><img src="${basePath }img/goods/<s:property value="good.img"/>" class="img-thumbnail" width="80" height="80" border="1"></td>
								<td style="vertical-align: middle;">￥<s:property value="good.price"/></td>
								<td style="vertical-align: middle;"><s:property value="quantity"/></td>
								<td style="vertical-align: middle;">￥<s:property value="price"/></td>
							</tr>
						</s:iterator>
						<tr>
							<td style="text-align: center;"><button class="_returnbtn" onclick="history.go(-1)">返回</button>
								<s:if test="order.status == '等待发货'">
									<button class="_sendbtn" onclick="doSend()">发货</button>
								</s:if>
							</td>
							<td colspan="4" style="text-align: right;padding-right: 20px;font-size: 16px;">总金额: 246.3</td>
						</tr>
					</table>
				</div>
			</div><!--/table-->
	   	</div> <!-- /container -->			
		
		<script>
			$('.dropdown-toggle').dropdown();
			
			
			//修改
			function domodify(){
				document.forms[0].submit();
			}
			
			//发货
			function doSend(){
				var orderId = $('#orderId').val();
				window.location = "${basePath}admin_doSend.action?order.id="+orderId;
			}
			
		</script>
	</body>
</html>
